<li id="comment-{{ comment.id }}" class="comment clearfix">
    {% from pypress.helpers import gravatar %}
    <div class="comment-avatar">
        <a href="{{ comment.author.website or '#' }}"><img src="{{ gravatar(comment.author.email, size=50) }}" alt="{{ comment.author.nickname }}" /></a>
    </div>
    <div class="comment-by">
        <cite class="fn">{{ comment.author.nickname }}</cite>
        <abbr title="{{ comment.created_date }}" class="comment-time">{{ locale.format_date(comment.created_date) }}</abbr>
    </div>
    <div class="comment-text">
        {{ comment.markdown }}

        {% if current_user %}
        <div class="comment-meta">
            {% if comment.permissions.reply.can(handler.identity) and comment.parent_id is None %}
            <a href="#" class="comment-reply">{{ _("reply") }}</a> 
            {% end %}
            {% if comment.permissions.delete.can(handler.identity) %}
            <a href="#" onclick="$('#delete-comment-{{ comment.id }}').toggle(); return false;" class="comment-delete">{{ _("delete") }}</a>
                <div id="delete-comment-{{ comment.id }}" style="display:none;">
                    <strong>{{ _("Are you sure you want to delete this comment ?") }} </strong>
                    <a href="#" onclick="delete_comment('{{ reverse_url('comment_delete', comment.id) }}'); return false;">{{ _("yes") }}</a> / 
                    <a href="#" onclick="$('#delete-comment-{{ comment.id }}').toggle(); return false;">{{ _("no") }}</a>
                </div>
            {% end %}
        </div>

        {% end %}
    </div>
    
    {% if comment.comments %}
        <div class="comment-list">
            <ol>
            {% for child_comment in comment.comments %}
                {% module Comment(child_comment, form) %}
            {% end %}
            </ol>
        </div>
    {% end %}
</li>
